<?php

	$data = file_get_contents("starnet.sql");
	
	function _convert($content) {
    if(!mb_check_encoding($content, 'UTF-8')
        OR !($content === mb_convert_encoding(mb_convert_encoding($content, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) {

        $content = mb_convert_encoding($content, 'UTF-8');

        if (mb_check_encoding($content, 'UTF-8')) {
            echo "Converted to UTF-8";
        } else {
            echo "Could not converted to UTF-8";
        }
    }
    	return $content;
	}



	$dataConverted = _convert($data);
	
	var_dump($dataConverted);
	
	
	$f=file_put_contents("starnetUTF8.sql",$dataConverted);


?>